<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<title>My JSP 'test.jsp' starting page</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<body>

	<%--<form>
您所在的城市：
		<input type="checkbox" name="city1" value="0" />安徽 
		<input type="checkbox" name="city1" value="1" />浙江 
		<input type="checkbox" name="city2" value="2" />江苏 
		<input type="checkbox" name="city2" value="3" />北京 <br />
		
		 
		<input type="submit" name="submit" value="Submit">
	</form>

	--%><input id="" type="text" onclick="getKey()" />
	
	<div></div>
	<%--<label>输入验证码</label>
	<br />
	<input type="text" name="randomCode" />
	<img title="点击更换" onclick="javascript:refresh(this);"
		src="imageServlet">
	<br />
		<input type="submit" value="submit">
--%>
</body>
<script type="text/javascript">

$(function() {
	var aa="";
	$("input").keydown(
			function(event) {
		aa=aa+event.which+",";
		$("div").html("Key: " + event.which);
	});
	$("input").blur(function(){
		alert(aa);
	});
		
});

	
	/*checkboxToRadio("city1");
	function checkboxToRadio(checkboxName) {
		if (checkboxName == null){
			return;
		}
		checkboxs = document.getElementsByName(checkboxName);
		for (i = 0; i < checkboxs.length; i++) {
			checkboxs[i].onclick = function() {
				for (j = 0; j < checkboxs.length; j++) {
					if (this.value != checkboxs[j].value&& checkboxs[j].checked == true) {
						checkboxs[j].checked = false;
					}
				}
			};
		}
	}*/

	

	/*$(function() {
		 obj.src = "/imageServlet?"+Math.random();
	});*/
</script>
</html>
